<!DOCTYPE html>
<html lang="zxx" class="no-js">

<head>
	<!-- Mobile Specific Meta -->
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<!-- Favicon-->
	<link rel="shortcut icon" href="img/fav.png">
	<!-- Author Meta -->
	<meta name="author" content="codepixer">
	<!-- Meta Description -->
	<meta name="description" content="">
	<!-- Meta Keyword -->
	<meta name="keywords" content="">
	<!-- meta character set -->
	<meta charset="UTF-8">
	<!-- Site Title -->
	<title>Educature Education</title>

	<!--
			CSS
			============================================= -->
	<link rel="stylesheet"  href="/bootstrap-3.3.7/css/bootstrap.min.css"/>
	<link rel="stylesheet"  href="/bootstrap-fileinput-4.5.2/css/fileinput.min.css"/>
</head>

<body>
       

	<!-- ####################### Start Scroll to Top Area ####################### -->
	<div id="back-top">
		<a title="Go to Top" href="#"></a>
	</div>
	<!-- ####################### End Scroll to Top Area ####################### -->

	<form enctype="multipart/form-data">
        <div class="file-loading">
            <input id="kv-explorer" type="file" multiple data-min-file-count="1" data-theme="fas">
        </div>
    </form>
	<script src="/js/jquery-2.2.4.min.js"></script>
	<script src="/bootstrap-3.3.7/js/bootstrap.min.js"></script>
	<script src="/bootstrap-fileinput-4.5.2/js/fileinput.min.js"></script>
	
	<script type="text/javascript">
	//初始化fileinput控件（第一次初始化）
	function initFileInput(ctrlName, uploadUrl) { 
		 var control = $('#' + ctrlName); 
		 control.fileinput({
				 language: 'zh', //设置语言
				 uploadUrl: uploadUrl, //上传的地址
				 allowedFileExtensions : ['jpg', 'png','gif'],//接收的文件后缀
				 showUpload: false, //是否显示上传按钮
				 showCaption: false,//是否显示标题
				 browseClass: "btn btn-primary", //按钮样式 
				 previewFileIcon: "<i class='glyphicon glyphicon-king'></i>", 
	 	});
	}
	/* 
	//添加记录的窗体处理 
	formValidate("ffAdd", function (form) { 
		$("#add").modal("hide"); 
		//构造参数发送给后台 
		var postData = $("#ffAdd").serializeArray(); 
		$.post(url, postData, function (json) { 
			var data = $.parseJSON(json); 
			if (data.Success) { 
				//增加肖像的上传处理
				initPortrait(data.Data1);
				//使用写入的ID进行更新
				$('#file-Portrait').fileinput('upload'); 
				//保存成功 1.关闭弹出层，2.刷新表格数据 
				showTips("保存成功"); 
				Refresh(); 
				} else { 
					showError("保存失败:" + data.ErrorMessage, 3000); 
					} 
			}).error(function () { 
				showTips("您未被授权使用该功能，请联系管理员进行处理。"); 
				}); 
		}); */
	
	$(function() {
		$("#kv-explorer").fileinput({
            'theme': 'explorer-fas',
            language: 'zh', //设置语言 
			uploadUrl: "/upload", //上传的地址 
            overwriteInitial: false,
            initialPreviewAsData: true,
            showUpload: true, //是否显示上传按钮 s
			howCaption: false,//是否显示标题 
			maxFileCount: 100, 
			enctype: 'multipart/form-data', 
            browseClass: "btn btn-primary", //按钮样式 
			previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",  
			msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
            /* initialPreview: [
                "http://lorempixel.com/1920/1080/nature/1",
                "http://lorempixel.com/1920/1080/nature/2",
                "http://lorempixel.com/1920/1080/nature/3"
            ],
            initialPreviewConfig: [
                {caption: "nature-1.jpg", size: 329892, width: "120px", url: "{$url}", key: 1},
                {caption: "nature-2.jpg", size: 872378, width: "120px", url: "{$url}", key: 2},
                {caption: "nature-3.jpg", size: 632762, width: "120px", url: "{$url}", key: 3}
            ] */
        });
		//初始化fileinput控件（第一次初始化）
		//initFileInput("file-Portrait", "/User/EditPortrait");
		//初始化fileinput控件（第一次初始化） 
		$('#file-Portrait').fileinput({ 
			language: 'zh', //设置语言 
			uploadUrl: "/upload", //上传的地址 
			allowedFileExtensions : ['jpg', 'png','gif'],//接收的文件后缀, 
			maxFileCount: 100, enctype: 'multipart/form-data', 
			showUpload: true, //是否显示上传按钮 s
			howCaption: false,//是否显示标题 
			browseClass: "btn btn-primary", //按钮样式 
			previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",  
			msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！", 
		});
	});
	
	</script>
</body>

</html>